import {
  usernameClient,
  adminClient,
  organizationClient,
  genericOAuthClient
} from 'better-auth/client/plugins'
import { createAuthClient } from 'better-auth/vue'

const config = useRuntimeConfig()

export const auth = createAuthClient({
  baseURL: config.BETTER_AUTH_URL,
  plugins: [
    // 这里如果后端有一些better-auth插件，这里也要引入对应的前端插件
    usernameClient(),
    organizationClient(),
    adminClient(),
    genericOAuthClient()
  ]
})
